package edu.pku.hawk.service.impl;

import java.util.ArrayList;

import edu.pku.hawk.controller.util.Config;
import edu.pku.hawk.controller.util.DetectorInfo;
import edu.pku.hawk.controller.util.SubjectDescription;
import edu.pku.hawk.service.BattlefieldInfoSer;

public class BattlefieldInfoSerImpl implements BattlefieldInfoSer{

	public SubjectDescription[] getSubjectsLocation() {
		ArrayList<DetectorInfo> dl = Config.Singleton.Instance.getSersorInfoList();
		SubjectDescription[] ret = new SubjectDescription[dl.size()];
		for(int i=0 ; i<dl.size() ; i++) {
			DetectorInfo di= dl.get(i);
			SubjectDescription sd = new SubjectDescription(di.id, di.type, di.x, di.y,di.x1, di.y1);
			ret[i] = sd;
		}
		return ret;
	}
}
